﻿using Authority.Doamin;
using Microsoft.EntityFrameworkCore;

namespace Authority.EFRepositoryImpl
{
    public class AuthorityDbContext : DbContext
    {
        public AuthorityDbContext()
        {
        }

        public AuthorityDbContext(DbContextOptions<AuthorityDbContext> options)
            : base(options)
        {

        }

        /// <summary>
        ///  功能权限
        /// </summary>
        public virtual DbSet<ActionAuthority> ActionAuthority { get; set; }

        /// <summary>
        ///  权限模组
        /// </summary>
        public virtual DbSet<AuthorityModule> AuthorityModule { get; set; }

        /// <summary>
        ///  权限模组承载的功能权限
        /// </summary>
        public virtual DbSet<AuthorityModuleCarryActionAuthority> AuthorityModuleCarryActionAuthority { get; set; }

        /// <summary>
        ///  权限模组承载的菜单权限
        /// </summary>
        public virtual DbSet<AuthorityModuleCarryMenuAuthority> AuthorityModuleCarryMenuAuthority { get; set; }

        /// <summary>
        ///  权限模组承载的路由权限
        /// </summary>
        public virtual DbSet<AuthorityModuleCarryRoutingAuthority> AuthorityModuleCarryRoutingAuthority { get; set; }

        /// <summary>
        ///  菜单权限
        /// </summary>
        public virtual DbSet<MenuAuthority> MenuAuthority { get; set; }

        /// <summary>
        ///  收模组影响的角色
        /// </summary>
        public virtual DbSet<RoleAffectedByAuthorityModule> RoleAffectedByAuthorityModule { get; set; }

        /// <summary>
        ///  角色权限
        /// </summary>
        public virtual DbSet<RoleAuthority> RoleAuthority { get; set; }

        /// <summary>
        ///  角色权限的功能
        /// </summary>
        public virtual DbSet<RoleAuthorityAction> RoleAuthorityAction { get; set; }

        /// <summary>
        ///  角色权限的菜单
        /// </summary>
        public virtual DbSet<RoleAuthorityMenu> RoleAuthorityMenu { get; set; }

        /// <summary>
        ///  角色权限的路由
        /// </summary>
        public virtual DbSet<RoleAuthorityRouting> RoleAuthorityRouting { get; set; }

        /// <summary>
        ///  路由权限
        /// </summary>
        public virtual DbSet<RoutingAuthority> RoutingAuthority { get; set; }

        /// <summary>
        ///  路由承载的功能
        /// </summary>
        public virtual DbSet<RoutingCarryAction> RoutingCarryAction { get; set; }

        /// <summary>
        ///  子系统
        /// </summary>
        public virtual DbSet<Subsystem> Subsystem { get; set; }

        /// <summary>
        ///  用户
        /// </summary>
        public virtual DbSet<User> User { get; set; }

        /// <summary>
        ///  用户的角色权限
        /// </summary>
        public virtual DbSet<UserRoleAuthority> UserRoleAuthority { get; set; }
    }
}